import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str=sc.next();
        char[] ch=str.toCharArray();
        for(int i=0;i<ch.length;i++){
            if(ch[i]>='0'&&ch[i]<='9'){
                while(ch[i]!='1'){
                    System.out.print(ch[i-1]);
                    ch[i]= (char) (ch[i]-1);
                }
            }else{
                System.out.print(ch[i]);
            }
        }
    }
}